package cn.jtfadmin.base.lang.config.statuscode;

import cn.jtfadmin.base.lang.config.WebConfig;
import org.springframework.stereotype.Component;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * 成功状态码配置
 *
 * @author jtf
 * @see StatusCodeConfig
 * @see StatusCodeManager
 * @see WebConfig#configureHandlerExceptionResolvers(List)
 * @since 0.0.1
 */
@Component
public class SuccessStatusCodeConfig implements StatusCodeConfig {


    public static final Integer SUCCESS_CODE = 200;

    public static final String SUCCESS_MSG = "操作成功";


    @Override
    public Set<StatusDescribe> getStatusDecribes() {
        Set<StatusDescribe> set = new HashSet<>();
        set.add(new StatusDescribe(SUCCESS_MSG, SUCCESS_CODE));// 运行异常
        return set;
    }
}
